package com.goktech.mapper;

import com.goktech.entity.Book;
import com.goktech.entity.User;
import com.goktech.entity.borrow;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface BorrowMapper {
    public int insertBorrow(borrow b);

    public int deleteBorrow(borrow b);

    public int updateBorrow(borrow b);

    public int updateBorrow1(borrow b);

    public List<Map<String,Object>> findByUserId(@Param("User") User u,@Param("begin") int begin, @Param("end") int end);

    public List<Map<String,Object>> findByBookId(Book b);

    public List<Map<String,Object>>findByAll(@Param("begin") int begin, @Param("end") int end);

    public List<Map<String,Object>>findLikeZhanghao(User u);

    public List<Map<String,Object>>findLikeUsername(User u);

    public Map<String,Object>findByBorrid(borrow b);

    public borrow findByBorrow(borrow b);

    public List<borrow> findIsReturn(@Param("User")User user);
}
